// main.js
// 显式定义 Vue 特性标志
(window as any).__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
(window as any).__VUE_OPTIONS_API__ = true;
(window as any).__VUE_PROD_DEVTOOLS__ = false;
// import IndexView from './components/IndexView.vue'//引入组件
import { createApp } from 'vue'
import 'element-plus/dist/index.css'; // 核心样式
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus); // 配置 ElementPlus
app.use(store);
app.use(router);
app.mount('#app');
app.directive('highlight-row', {
  mounted(el, binding) {
    const index = binding.value;
    el.style.backgroundColor = index % 2 === 0 ? '#00008B' : '#FF7F00';
  },
  updated(el, binding) {
    const index = binding.value;
    el.style.backgroundColor = index % 2 === 0 ? '#00008B' : '#FF7F00';
  }
})
// app.component("IndexView",IndexView)//注册组件
// app.provide("age",18)//定义全局数据也可以实现组件通讯
// app.provide("checkbox",["HTML","CSS","JS","VUE","TS"])
// app.provide("sex",["男","女"])
// app.provide("pull",["亚洲","欧洲","非洲"])